package com.mall.permission.mapper;

import com.mall.permission.model.RolePermission;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * URL权限关系对应 Mapper 接口
 * </p>
 *
 * @author Darren
 * @since 2022-10-20
 */
@Mapper
public interface RolePermissionMapper extends BaseMapper<RolePermission> {

    /**
     * 所有角色的权限映射
     *
     * @return
     */
    @Select("select * from role_permission")
    List<Map<String, String>> allRolePermissions();

}
